import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/Home'
  },
  {
    path: '/Home',
    name: 'home',
    component: () => import('../views/Home.vue')
  },
]




const router = new VueRouter({
  routes
})

// router.beforeEach((to, form, next) => {
// const user = window.sessionStorage.getItem('user') || ''
// if (to.path === '/Login') return next()
// if (!user) {
//   return next('/Login')
// }
// next()
// })

export default router
